how to scan and print an array in c